function del_GLacc(form){
	var GL_ACC = document.getElementById("GL_ACC"); //textarea
	var GL = document.getElementById("GL"); //account
	var GLACCOUNT = document.getElementById("GLACCOUNT"); //hidden
	var strGL_ACC = GL_ACC.value;
	var strGL = GL.value;
	var strGLACCOUNT = GLACCOUNT.value;
	
	var newACC = del(strGLACCOUNT,strGL);
	//alert(newACC);
	if(newACC!="-1"){
		GL_ACC.value = newACC;
		GLACCOUNT.value = newACC;
	}
	

}

function del(strGLACCOUNT,strGL){
	var pos_GL = strGLACCOUNT.indexOf(strGL);//vi tri cua TK GL can xoa
	var newACC = "-1";
	if (pos_GL != -1){ 
		var pGL = strGLACCOUNT.substring(0, pos_GL);
		var aGL = strGLACCOUNT.substring(pGL.length+strGL.length+1);
		newACC = pGL + aGL;
	}
	return newACC;
	
}

function valbutton(thisform,objname) {
	var objradio = thisform.radioTK;
	var radioLength = objradio.length;
	var id, i;
	if(!radioLength){
		id = objradio.value;		
	}else{
		for(i = 0; i < radioLength; i++){
			if(thisform.radioTK[i].checked){
				id = thisform.radioTK[i].value;
				break;
			}
		}
	}
	var name = id.split('-');
	var obj = window.opener.document.getElementById(objname);
	if(obj){
		obj.value = name[0];
	}
	window.close();
}